package com.xing.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component //注册bean到容器中
@ConfigurationProperties(prefix = "dog")
public class Dog {
//    @Value("旺财")
    private String firstName;
//    @Value("3")
    private Integer age;
    //有参无参构造、get、set方法、toString()方法
}

